package com.hl.toolkit.server.tycoin.user.slaveservice;

import com.tycoin.common.repository.AbstractRepository;
import com.tycoin.common.service.AbstractService;
import com.tycoin.user.slaveentity.TycoinUser;
import com.tycoin.user.slaverepository.TycoinUserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service	
@Transactional(value = "slaveTransactionManager", readOnly = true)
public class TycoinUserService   extends AbstractService<TycoinUser, Long> {

	@Autowired
	private TycoinUserRepository tycoinUserRepository;
	
	
	@Override
	public AbstractRepository<TycoinUser, Long> getRepository() {
 		return tycoinUserRepository;
	}

 

	public TycoinUser findOneBymobile(String mobile) {
 		return tycoinUserRepository.findOneBymobile(mobile);
	}
	
	
	public TycoinUser findOneByusername(String username) {
 		return tycoinUserRepository.findOneByusername(username);
	}
	
	
	public TycoinUser findOneByemail(String email) {
 		return tycoinUserRepository.findOneByemail(email);
	}

	public TycoinUser findOneByweixin(String openId) {
		return tycoinUserRepository.findOneByweixin(openId);
	}




	
	
	
	

}
